<header id="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="<%= window.location.href %>">每日策略分析</a>
            </li>
        </ol>
    </div>
</header>
<section id="content">
<div class="panel">
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-md-7">
                <input type="text" id="dateFilter" name="dateFilter" class="form-control text-center" value="<%= options.dateRange[0] %> ~ <%= options.dateRange[1] %>">
            </div>
            <div class="col-md-2">
                <input type="text" id="rechargeLower" class="form-control" value="<%= options.rechargeRange ? options.rechargeRange[0] : '' %>" placeholder="充值>=">
            </div>
            <div class="col-md-2">
                <input type="text" id="rechargeUpper" class="form-control" value="<%= options.rechargeRange ? options.rechargeRange[1] : '' %>" placeholder="充值<=">
            </div>
            <div class="col-md-1">
                <input type="button" id="search" class="btn btn-primary btn-block form-control" value="提交">
            </div>
        </div>
    </form>
</div>

<div class="panel">
    <div class="panel-heading">
        <span class="panel-icon"><i class="fa fa-gear text-primary"></i>
        </span>
        <span class="panel-title">盈利区间占比图</span>
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-6" id="countPie">

            </div>
            <div class="col-md-6" id="amountPie">

            </div>
        </div>
    </div>
</div>

<div class="panel">
    <div class="panel-heading">
        <span class="panel-icon"><i class="fa fa-gear text-primary"></i>
        </span>
        <span class="panel-title">数据表格</span>
    </div>
    <div class="panel-body">
        <table class="table table-striped fs13">
            <thead>
                <tr class="bg-light">
                    <th>盈利区间</th>
                    <th>人数</th>
                    <th>人数占比</th>
                    <th>充值金额</th>
                    <th>金额占比</th>
                </tr>
            </thead>
            <tbody class="admin-form">
                <% _.each(items, function(item){
                %>
                    <tr>
                        <td><%= item.id %></td>
                        <td><%= item.count %></td>
                        <td><%= total.count ? (item.count * 100 /total.count).toFixed(2) : 0 %>%</td>
                        <td><%= item.amount %></td>
                        <td><%= total.amount ? (item.amount * 100 /total.amount).toFixed(2) : 0 %>%</td>
                    </tr>
                <% }) %>
            </tbody>
        </table>
    </div>
</div>
</section>